package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.Client;
import com.ruoyi.system.mapper.ClientMapper;
import com.ruoyi.system.service.IClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * clientService业务层处理
 *
 * @author van
 * @date 2022-04-25
 */
@Service
public class ClientServiceImpl implements IClientService
{
    @Autowired
    private ClientMapper clientMapper;

    /**
     * 查询client
     *
     * @param id client主键
     * @return client
     */
    @Override
    public Client selectClientById(Long id)
    {
        return clientMapper.selectClientById(id);
    }

    /**
     * 查询client列表
     *
     * @param client client
     * @return client
     */
    @Override
    public List<Client> selectClientList(Client client)
    {
        return clientMapper.selectClientList(client);
    }

    /**
     * 新增client
     *
     * @param client client
     * @return 结果
     */
    @Override
    public int insertClient(Client client)
    {
        return clientMapper.insertClient(client);
    }

    /**
     * 修改client
     *
     * @param client client
     * @return 结果
     */
    @Override
    public int updateClient(Client client)
    {
        return clientMapper.updateClient(client);
    }

    /**
     * 批量删除client
     *
     * @param ids 需要删除的client主键
     * @return 结果
     */
    @Override
    public int deleteClientByIds(Long[] ids)
    {
        return clientMapper.deleteClientByIds(ids);
    }

    /**
     * 删除client信息
     *
     * @param id client主键
     * @return 结果
     */
    @Override
    public int deleteClientById(Long id)
    {
        return clientMapper.deleteClientById(id);
    }
}
